using UnityEngine;

public class ItemUI_Option : MonoBehaviour
{
    private ItemUI_Button[] buttons;
    private ItemUI_Manager manager;

    private void Awake()
    {
        buttons = GetComponentsInChildren<ItemUI_Button>();
        manager = CommonUI.GetUIComponent<ItemUI_Manager>();
        manager.RightClickItem += OnRightClickItem;
    }

    private void OnRightClickItem()
    {
        foreach (ItemUI_Button button in buttons)
        {
            bool active = button.CheckAvtive();
            button.gameObject.SetActive(active);
        }
    }
}